{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 动态系统建模\n",
    "Drake与Simulink的主要不同在于Drake更注重系统的内部信息。。。\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1、写成自己的动力学方程\n",
    "每个用户系统都可以使用pydrake.systems.framework.LeafSystem类写出来。\n",
    "\n",
    "但是，我们感兴趣的很多动态系统是以状态空间形式表示的向量域，其中通常用$x$表示状态向量，用$u$表示输入向量，并用$y$表示输出向量。为了更容易的表示这种形式的系统，我们提供了另一个子类pydrake.systems.primitives.SymbolicVectorSystem，来表示这些简单系统\n",
    "\n",
    "![向量系统](./images/vector-system.png)\n",
    "\n",
    "### 1.1 使用SymbolicVectorSystem\n",
    "考虑一个基本的线性时间、非线性、输入-输出动态系统，由厦门的状态空间方程描述：\n",
    "$$\n",
    "\\dot{x} = f(t,x,u)  \\\\\n",
    "y = g(t,x,u)  \\\\\n",
    "$$\n",
    "在pydrake中，可以实现由Drake的符号引擎支撑的任何系统，比如\n",
    "$$\n",
    "\\dot{x} = -x+x^3  \\\\\n",
    "y = x  \\\\\n",
    "$$\n",
    "该系统的输入为0，只有一个状态变量，和一个输出。在Drake中，使用下面的代码实现该系统："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pydrake.symbolic import Variable\n",
    "from pydrake.systems.primitives import SymbolicVectorSystem\n",
    "\n",
    "# Define a new symbolic Variable\n",
    "x = Variable(\"x\")\n",
    "\n",
    "# Define the System.  \n",
    "continuous_vector_system = SymbolicVectorSystem(state=[x], dynamics=[-x + x**3], output=[x])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "这就行了。continuous_vector_system现在是Drake系统类的一个实例，可以使用了。\n",
    "\n",
    "同样也可以实例化一个离散时间系统，这里先略。。。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.2 使用LeafSystem生成系统\n",
    "通过LeafSystem，Drake可支持生成各种输入输出、混合离散时间和连续时间动力学、混合动态以及约束、甚至随机特性的系统。\n",
    "下面是一个例子："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pydrake.systems.framework import BasicVector, LeafSystem\n",
    "\n",
    "# Define the system.\n",
    "class SimpleContinuousTimeSystem(LeafSystem):\n",
    "    def __init__(self):\n",
    "        LeafSystem.__init__(self)\n",
    "        \n",
    "        self.DeclareContinuousState(1)             # One state variable.\n",
    "        self.DeclareVectorOutputPort(\"y\", BasicVector(1), self.CopyStateOut)           # One output.\n",
    "\n",
    "    # xdot(t) = -x(t) + x^3(t)\n",
    "    def DoCalcTimeDerivatives(self, context, derivatives):\n",
    "        x = context.get_continuous_state_vector().GetAtIndex(0)\n",
    "        xdot = -x + x**3\n",
    "        derivatives.get_mutable_vector().SetAtIndex(0, xdot)\n",
    "\n",
    "    # y = x\n",
    "    def CopyStateOut(self, context, output):\n",
    "        x = context.get_continuous_state_vector().CopyToVector()\n",
    "        output.SetFromVector(x)\n",
    "\n",
    "# Instantiate the System        \n",
    "continuous_system = SimpleContinuousTimeSystem()\n",
    "\n",
    "\n",
    "# Define the system.\n",
    "class SimpleDiscreteTimeSystem(LeafSystem):\n",
    "    def __init__(self):\n",
    "        LeafSystem.__init__(self)\n",
    "        \n",
    "        self.DeclareDiscreteState(1)             # One state variable.\n",
    "        self.DeclareVectorOutputPort(\"y\", BasicVector(1), self.CopyStateOut)           # One output.\n",
    "        self.DeclarePeriodicDiscreteUpdate(1.0)  # One second timestep.\n",
    "\n",
    "    # x[n+1] = x^3[n]\n",
    "    def DoCalcDiscreteVariableUpdates(self, context, events, discrete_state):\n",
    "        x = context.get_discrete_state_vector().GetAtIndex(0)\n",
    "        xnext = x**3\n",
    "        discrete_state.get_mutable_vector().SetAtIndex(0, xnext)\n",
    "\n",
    "    # y = x\n",
    "    def CopyStateOut(self, context, output):\n",
    "        x = context.get_discrete_state_vector().CopyToVector()\n",
    "        output.SetFromVector(x)\n",
    "\n",
    "# Instantiate the System        \n",
    "discrete_system = SimpleDiscreteTimeSystem()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "上面的代码实现了同1.1节一样的系统，但是这里不同的是，我们可以输入任意的方程，不需要pydrake.symbolic的支持。\n",
    "\n",
    "但是，使用这种方式生成的系统不支持Drake的autodiff和symbolic工具。要使用的话需要增加一些代码。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2、仿真\n",
    "一旦我们有了系统的对象，最简单的事就是进行仿真。这可以通过pydrake.framework.analysis.Simulator实现。\n",
    "\n",
    "为了显示仿真中的数据，我们可以在系统框图（diagram）中增加一个信号记录器（pydrake.framework.primitives.SignalLogger）。\n",
    "\n",
    "下面是一个例子："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAfo0lEQVR4nO3dd5zU9b3v8ddnZrawjbZL2UIHEZAii4q9RMUGGvGIJmo8JsZETW7KjebeY8pJbq5JTKKJGuNRj9EUYpAoGuwlUWwsCArSNtSlLUtZytbZ+Z4/ZsBlXZAyv/3tzO/9fDzmMfMrM/se4MF7f+37M+ccIiISXCG/A4iIiL9UBCIiAaciEBEJOBWBiEjAqQhERAIu4neAw1VYWOgGDBjgdwwRkZQyb968GudcUXvLUq4IBgwYQEVFhd8xRERSipmtOdAy7RoSEQk4FYGISMCpCEREAk5FICIScCoCEZGAUxGIiAScikBEJOACUwTVuxr4wazFNEVjfkcREelUAlME81Zv59G3VvPjv3/kdxQRkU4lMEVwwXF9+eKpA3ns7TU8s3CD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ubKvUFpQiqgLJW06Wk6eZka2aWQbwE/uicm+l3Ho+dAkw2s9XEd/2dbWZ/8DdSh6gCqpxze7f2ZhAvhnT1GWCVc26Lc64ZmAmc7HOmjrTZzPoCJJ6rk/GhQSmCucBQMxtoZpnEDy7N8jmTp8zMiO83XuKc+6XfebzmnPuuc67UOTeA+N/vq865tP9N0Tm3CVhnZsckZp0DfORjJK+tBU4ys5zEv/FzSOOD4+2YBVyXeH0d8HQyPtTTexZ3Fs65qJndArxA/CyDR5xzi32O5bVTgGuAD81sQWLe/0ncR1rSy63AHxO/5KwErvc5j2ecc++a2QxgPvEz494nTYeaMLM/A2cChWZWBXwfuBN4wsxuIF6KVyTlZ2mICRGRYAvKriERETkAFYGISMCpCEREAk5FICIScCoCEZGAUxGIJEFiBNCv+p1D5EioCESSoxugIpCUpCIQSY47gcFmtsDMfu53GJHDoQvKRJIgMcLrs4kx8kVSirYIREQCTkUgIhJwKgKR5NgF5PsdQuRIqAhEksA5txWYk7ihug4WS0rRwWIRkYDTFoGISMCpCEREAk5FICIScCoCEZGAUxGIiAScikBEJOBUBCIiAfc/UJs9h5xCZsEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAARkUlEQVR4nO3df5BVZ33H8fe3C2lXrWIb/MESCnUQpTUpdY1GW5tq7RJ1hKqdJqlWUx2SjtG00yGC01pnnLZW2o7OiCLGqK0OxEEGqYOuHa06o1MDhDSE0FWGKOwSG1K72rHbAMu3f+wlvbn7g124Z89yn/drhtl7nvOc83zPJPDZc55zz4nMRJJUrp+qu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3/m2Jm/gA4HhErGk0vBx6osaSqHQNeFBFPaPw//nI6eHJ8AruBNzU+vwn4fDt2Wuk7i+eKzDwTEbcC/YzdZXBnZh6quayqvQR4I3AwIu5ttL2r8R5pdZa3A59p/JJzFLip5noqk5nfjogdwD2M3Rl3gA591EREbAOuBS6PiEHgL4D3AZ+NiLcwFoq/25axfMSEJJWtlEtDkqRJGASSVDiDQJIKZxBIUuEMAkkqnEEgSYUzCCSpcAaBdJEiYmnjPQAfazwn/8sR0V13XdJ0GQRSeywHNmfmLwHDwOvqLUeaPoNAao8HM/Pexuf9wNL6SpFmxiCQ2uPRps+jFPIcL3UGg0CSCmcQSFLhfPqoJBXOMwJJKpxBIEmFMwgkqXAGgSQVziCQpMIZBJJUOINAkgr3f8LJv+8Tc2UbAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "from pydrake.systems.analysis import Simulator\n",
    "from pydrake.systems.framework import DiagramBuilder\n",
    "from pydrake.systems.primitives import LogOutput\n",
    "\n",
    "# Create a simple block diagram containing our system.\n",
    "builder = DiagramBuilder()\n",
    "system = builder.AddSystem(SimpleContinuousTimeSystem())\n",
    "logger = LogOutput(system.get_output_port(0), builder)\n",
    "diagram = builder.Build()\n",
    "\n",
    "# Set the initial conditions, x(0).\n",
    "context = diagram.CreateDefaultContext()\n",
    "context.SetContinuousState([0.9])\n",
    "\n",
    "# Create the simulator, and simulate for 10 seconds.\n",
    "simulator = Simulator(diagram, context)\n",
    "simulator.AdvanceTo(10)\n",
    "\n",
    "# Plot the results.\n",
    "plt.figure()\n",
    "plt.plot(logger.sample_times(), logger.data().transpose())\n",
    "plt.xlabel('t')\n",
    "plt.ylabel('y(t)');\n",
    "# Create a simple block diagram containing our system.\n",
    "builder = DiagramBuilder()\n",
    "system = builder.AddSystem(SimpleDiscreteTimeSystem())\n",
    "logger = LogOutput(system.get_output_port(0), builder)\n",
    "diagram = builder.Build()\n",
    "\n",
    "# Create the simulator.\n",
    "simulator = Simulator(diagram)\n",
    "\n",
    "# Set the initial conditions, x(0).\n",
    "state = simulator.get_mutable_context().get_mutable_discrete_state_vector()\n",
    "state.SetFromVector([0.9])\n",
    "\n",
    "# Simulate for 10 seconds.\n",
    "simulator.AdvanceTo(10)\n",
    "\n",
    "# Plot the results.\n",
    "plt.figure()\n",
    "plt.stem(logger.sample_times(), logger.data().transpose(), use_line_collection=True)\n",
    "plt.xlabel('n')\n",
    "plt.ylabel('y[n]');"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "对很多系统来说，仿真将比实际系统快很多。如果你想让仿真器慢下来，可以使用仿真器（Simulator）的set_target_realtime_rate()函数。\n",
    "\n",
    "## 系统“上下文”（Context）\n",
    "\n",
    "上下文（context）是Drake中的核心概念：它包含了所有动态信息，包括时间、状态、输入和系统参数。\n",
    "\n",
    "要注意的是，当输入端口没有全部连接时，上下文是不完整的。因此，对于一些系统，需要考虑使用端口的FixValue函数。\n",
    "\n",
    "## 系统的复合：Diagram和DiagramBuilde\n",
    "\n",
    "Drake的建模能力体现在可以将小的系统复合为更复杂的系统。其中的概念非常简单：我们使用DiagramBuilder类增加系统（AddSystem()）并连接（Connect()）框图的输入端口和输出端口。然后，调用Build()来生成新的框图实例。\n",
    "\n",
    "下面的例子中，我们连接三个子系统（一个平台、一个控制器和一个记录器），并把控制器的输入暴露给框图：\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x7f576cde4a90>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUcAAADnCAYAAACNIpQxAAAAOXRFWHRTb2Z0d2FyZQBNYXRw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2+0cOHAAlUpFly5dmn26AlmWyc/Pp6ysjM6dOxMYGNis2z8fkuTthqXVugkPd9O5sw23G44dU5Gbq+XXXwP48ssQ4uIcDBpUQ8eONnS6pmnhF1qPZg9HWQaLRcHWrYH8+GMg4eFuRoyoplMn7weuNf4qu91uioqKiImJOWFKgdNxOp28//779OvXj/Hjx/PLL7+we/duFi9e3Khl9Hg87N+/n2+++YYlS5ac1XNlWWbTpk2YzWbGjh17TtuXZRmbzcbzzz/Pgw8+SEZGxlk9/9ixY2g0GoxG4ymXczgcHDt2jNjY2Cb7AfC1ssfEuIiJcTFggIWqKiV79uj59ttgPv88hFGjqujRo/b3PqpNUgyhhTVr3czjgZwcLc8/H0N2tpaZM8u4444SMjJq0etb74fMYrEwd+5cTCbTWT83ISGBxMREAIKCgujatesp55M5V3q9nvT09LMOb5+4uDiSk5PPefsKhYIOHTrUm6PmbCxZsoS1a9eedrn8/Hwefvhh/4RizUGSICTEzcCBNdx7bzFXXVXJunVGXn89iooKVYMt6ELb12w1R1mG337TsXRpBNdcU0GPHtYmbRX0zbG8adMmqquriY2NpW/fvhgMBqqqqti8eTPl5eUkJSXRr18/SkpKWLt2LWlpadhsNkwmE5mZmcTExLBu3TrKyspYvnw5HTp0IC0tje+++460tDRqa2spLCxk1KhRBAYGsmnTJiorK0lJSaFv377odLqTltHj8XDw4EH+97//oVAo6Nu3LwkJCfzwww8cOnSIfv36sX//fiRJYvLkyScEnyzLVFZW8sMPP2C32+vVujweD7m5ufzyyy/Iskzv3r3p0KEDTqeTrVu3UlBQQGRkJP3798fhcPDjjz8SGxtLamoqa9asobKykoyMDPbs2UNISAgjR45k165d7N+/n4CAAAYOHEhUVBQul4usrCxycnJITU09bWhZLBY2btzIsWPHSEhIoG/fvuTn57N3715KS0sxm81MmjQJtVrNTz/9RFFREdHR0QwaNAi328369espKiri3XffpWvXrgwYMIDS0lI2b96M1Wqlc+fOZGRknPOPxKlIkreBp0sXG+3alfDdd0ZeeimKu+8uITzcffoVCG1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uhg8fjlKpZMOGDezcuZOkpCTuvvtuCgoKyMjI4O9//zubN2/G4XDw6KOPcuTIESorK88qHJVKJY888ghZWVmUlpZy77330qdPHwAeffRRNm3axLXXXkvHjh1588032bJlC/v27eO6667j0KFDFBcXc9lll+F0OrHb7QwfPpzg4GCee+45tmzZQmVlJbNnzyYtLe2cg0uSJAICAmjfvj3t2rVj2LBheDweioqKyMrK4sMPP6SyspL+/fszZswY4uPjz6t/YWsSGQmdOsHatXD11X/MSChJLTMQru9Yr8ViITg4uEl239PT0+nbty/jx49vtka8cyXCsRnp9XomTpxY774JEyY0uOzJBqA9G5IkkZKS0mDfudTUVFJTU89oe8eX8fjnNhZf4CmVShISEoiPj2f8+PGUlpby3Xff8be//Y127dpx7bXX0r59+zZ1jLEhKhVcfz08/DD06+c9Brl9O+Tnw9ixoNE0f0hu376dv/71r9x3331MmjSp0dZrMpn8x9YHDhxIeHh4o627qbTu6BYuapIkoVariY+PZ/r06bz44ov06NGDZ599lqeffpqCgoI2PyhsUhJMmQLPPgvl5bBqFdx0E8yaBbt2eWuSzfUSJUli0KBBdOrUqdFbxB0OB2vXrmX79u1MnTq11dcaQdQchTZCkiRCQ0O58sorGTZsGGvWrOHRRx9lyJAhTJ06laCgoDZZi1QoYPx4qKnx1iB/+QWqquDdd+H77+HWW+HPf/a2bp+p/fv3k5+fT1BQECkpKezdu5eAgAD69+/fYCh5PB6OHDlCTk4OERERTdJVKCoqiscff7zR19uUWn98C0IdkiQREhLClClTePrppykrK+Ohhx5i586dbXYILrUarr0Wxo2D3FzvfbIMeXnwyCMwdSqsXg0Ox5l9XV0uF0uWLGHJkiVUVlaybNmyU/Z42LNnD7fffjs5OTns2rWLvXv3NsbLavNEzbERSZJEQUEB//znP89qPEdfl51zOYbmdDo5ePAgS5cuJSgo6GyL3KR8XXeaokYnSRKxsbHMnTuXjRs38ve//50xY8YwefLkNjmAq0IBsbFwfKXN6YQNGyArS0dU1ESqqrSEh5/6WGR6ejrPPfcct99+Oy+//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bqg+xu2FNEgIwiC0AARjoIgCA0Q4SgIgtAAEY6CIAgNEOEoCILQABGOgiAIDRDhKAiC0AARjoIgCA04r07gLpeLHTt24HQ6G6s8giAI523fvn3n3TH+vMKxT58+bN++neLi4vMqhCAIQmNyOBwMGTLkvNYhneZ8zLZ/sqYgCELD9gDdTvagOOYoCILQABGOgiAIDRDhKAiC0AARjoIgCA0Q4SgIgtAAEY6CIAgNEOEoCILQgNN1ApeapRSCIAitjKg5CoIgNECEoyAIQgNEOAqCIDRAhKMgCEIDRDgKgiA0QISjIAhCA/4fBZEoBLhuDpkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "from pydrake.systems.framework import DiagramBuilder\n",
    "from pydrake.systems.analysis import Simulator\n",
    "from pydrake.examples.pendulum import PendulumPlant\n",
    "from pydrake.systems.controllers import PidController\n",
    "from pydrake.systems.drawing import plot_system_graphviz\n",
    "from pydrake.systems.primitives import LogOutput\n",
    "\n",
    "builder = DiagramBuilder()\n",
    "\n",
    "# First add the pendulum.\n",
    "pendulum = builder.AddSystem(PendulumPlant())\n",
    "pendulum.set_name(\"pendulum\")\n",
    "\n",
    "controller = builder.AddSystem(PidController(kp=[10.], ki=[1.], kd=[1.]))\n",
    "controller.set_name(\"controller\")\n",
    "\n",
    "# Now \"wire up\" the controller to the plant.\n",
    "builder.Connect(pendulum.get_state_output_port(), controller.get_input_port_estimated_state())\n",
    "builder.Connect(controller.get_output_port_control(), pendulum.get_input_port())\n",
    "\n",
    "# Make the desired_state input of the controller an input to the diagram.\n",
    "builder.ExportInput(controller.get_input_port_desired_state())\n",
    "\n",
    "# Log the state of the pendulum.\n",
    "logger = LogOutput(pendulum.get_state_output_port(), builder)\n",
    "logger.set_name(\"logger\")\n",
    "\n",
    "diagram = builder.Build()\n",
    "diagram.set_name(\"diagram\")\n",
    "\n",
    "plt.figure()\n",
    "plot_system_graphviz(diagram, max_depth=2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "最后，可以对受控系统进行仿真。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEWCAYAAABrDZDcAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAuiElEQVR4nO3deXwc9X3/8ddHhw0GY8uysbGJZYtwOwQsA8oBOAltgCQcOVoIuUNd0jYNbdMkTQKkadqGpkfa0IQfAUIgnMHchYSQAA6HAK+xjY0DBuG1ZRtblta3kS3p8/tjZsVqvZeO0Uqa9/Px0EM7x858Nbv6fma+p7k7IiISXxXlToCIiJSXAoGISMwpEIiIxJwCgYhIzCkQiIjEnAKBiEjMKRBIbJnZLDNzM6vqx3sPNLMHzGybmf2yxPc8bmaX9D2l5WNma8zszMHeV4YXBYKYC/9595jZTjPbZGY/M7ODw209GZeZzTez7nC/nWbWYmZ3mtnJRY4/xsy+Y2arzWxXeL4bzGzWIKW9XBnPx4GpQK27fyJ7Y/g3/yKqkxf63ET6SoFAAD7i7gcDc4GTgW/n2W9DuN94oBH4A/B7M/tAgWPfBZwLfBKYALwTSACF3jMo+nOn3wd1wCvu3hnhOYop9XMTKUiBQHq4+3rgYWBOkf3c3Vvc/QrgOuCqXPuFd+t/BJzn7s+7e6e7b3P3/3X368N9ppvZ/WbWbmavmtmfZbz/O+FTx01mtsPMVprZvHDbzcBM4IHwrvhrGUU9XzSztcDvzKzCzL5tZkkz2xwea0Ip18PMjg2firaG5z43XP+PwBXAn4bn/mLW+84CvpmxfVnG5jozeyr8ex4xs8kZ72s0s6f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h/IZgbYaSoIvc0kCI56YlARCTm9EQgIhJzCgQiIjGnQCAiEnMKBCIiMadAICISc/8fJpDDoMS2NCUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Set up a simulator to run this diagram.\n",
    "simulator = Simulator(diagram)\n",
    "context = simulator.get_mutable_context()\n",
    "\n",
    "# We'll try to regulate the pendulum to a particular angle.\n",
    "desired_angle = np.pi/2.\n",
    "\n",
    "# First we extract the subsystem context for the pendulum.\n",
    "pendulum_context = diagram.GetMutableSubsystemContext(pendulum, context)\n",
    "# Then we can set the pendulum state, which is (theta, thetadot).\n",
    "pendulum_context.get_mutable_continuous_state_vector().SetFromVector([desired_angle+0.1, 0.2])\n",
    "\n",
    "# The diagram has a single input port (port index 0), which is the desired_state.\n",
    "diagram.get_input_port(0).FixValue(context, [desired_angle, 0.])\n",
    "\n",
    "# Reset the logger only because we've written this notebook with the opportunity to \n",
    "# simulate multiple times (in this cell) using the same logger object.  This is \n",
    "# often not needed.\n",
    "logger.reset()\n",
    "\n",
    "# Simulate for 10 seconds.\n",
    "simulator.AdvanceTo(20);\n",
    "\n",
    "# Plot the results.\n",
    "t = logger.sample_times()\n",
    "plt.figure()\n",
    "# Plot theta.\n",
    "plt.plot(t, logger.data()[0,:],'.-')\n",
    "# Draw a line for the desired angle.\n",
    "plt.plot([t[0], t[-1]], [desired_angle, desired_angle], 'g' )\n",
    "plt.xlabel('time (seconds)')\n",
    "plt.ylabel('theta (rad)')\n",
    "plt.title('PID Control of the Pendulum');"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
